package com.iscas.dataaggregation.domain.experiment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName record
 */
@TableName(value ="record")
@Data
public class Record implements Serializable {
    /**
     * 记录id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 压测状态(0: 无压测、1: 未开始 2:压测中 3:已结束)
     */
    private Integer press_status;

    /**
     * 演练进度 百分制
     */
    private Integer record_progress;

    /**
     * 执行人员
     */
    private Integer player_id;

    /**
     * 开始时间
     */
    private Date start_time;

    /**
     * 结束时间
     */
    private Date end_time;

    /**
     * 执行状态(1: 运行中 2:成功 3:失败)
     */
    private Integer record_status;

    /**
     * 所属计划id
     */
    private Integer plan_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Record other = (Record) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPress_status() == null ? other.getPress_status() == null : this.getPress_status().equals(other.getPress_status()))
            && (this.getRecord_progress() == null ? other.getRecord_progress() == null : this.getRecord_progress().equals(other.getRecord_progress()))
            && (this.getPlayer_id() == null ? other.getPlayer_id() == null : this.getPlayer_id().equals(other.getPlayer_id()))
            && (this.getStart_time() == null ? other.getStart_time() == null : this.getStart_time().equals(other.getStart_time()))
            && (this.getEnd_time() == null ? other.getEnd_time() == null : this.getEnd_time().equals(other.getEnd_time()))
            && (this.getRecord_status() == null ? other.getRecord_status() == null : this.getRecord_status().equals(other.getRecord_status()))
            && (this.getPlan_id() == null ? other.getPlan_id() == null : this.getPlan_id().equals(other.getPlan_id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPress_status() == null) ? 0 : getPress_status().hashCode());
        result = prime * result + ((getRecord_progress() == null) ? 0 : getRecord_progress().hashCode());
        result = prime * result + ((getPlayer_id() == null) ? 0 : getPlayer_id().hashCode());
        result = prime * result + ((getStart_time() == null) ? 0 : getStart_time().hashCode());
        result = prime * result + ((getEnd_time() == null) ? 0 : getEnd_time().hashCode());
        result = prime * result + ((getRecord_status() == null) ? 0 : getRecord_status().hashCode());
        result = prime * result + ((getPlan_id() == null) ? 0 : getPlan_id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", press_status=").append(press_status);
        sb.append(", record_progress=").append(record_progress);
        sb.append(", player_id=").append(player_id);
        sb.append(", start_time=").append(start_time);
        sb.append(", end_time=").append(end_time);
        sb.append(", record_status=").append(record_status);
        sb.append(", plan_id=").append(plan_id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}